package org.gp.demo.proxy;

import java.lang.reflect.Proxy;

import junit.framework.TestCase;

public class PoxyTest extends TestCase {
	public void testPoxy1() {
		HelloImpl helloImpl = new HelloImpl();
		LogHelloPoxy logPoxy = new LogHelloPoxy(helloImpl);
		Hello hello = (Hello) Proxy.newProxyInstance(helloImpl.getClass()
				.getClassLoader(), helloImpl.getClass().getInterfaces(),
				logPoxy);
		hello.print("All this test \n");
		hello.sayHello("Tom"); 
	}
}
